/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */

.theme-light {
  --gutter-hover-background-color: #dde1e4;
  --breakpoint-fill: var(--primary-accent);
  --breakpoint-stroke: var(--primary-accent-hover);
}

.theme-dark {
  --gutter-hover-background-color: #414141;
  --breakpoint-fill: var(--primary-accent);
  --breakpoint-stroke: var(--primary-accent-hover);
}

.theme-light,
.theme-dark {
  --breakpoint-skipped-opacity: 0.15;
  --breakpoint-inactive-opacity: 0.3;
  --breakpoint-disabled-opacity: 0.6;
}

/* Standard gutter breakpoints */
.editor-wrapper .breakpoints {
  position: absolute;
  top: 0;
  left: 0;
}

.new-breakpoint .CodeMirror-linenumber {
  pointer-events: none;
}

.editor-wrapper
  :not(.empty-line):not(.new-breakpoint):hover
  > .CodeMirror-gutter-wrapper
  > .CodeMirror-linenumber::after {
  content: "";
  position: absolute;
  /* paint below the number */
  z-index: -1;
  top: 0;
  left: 0;
  right: -4px;
  bottom: 0;
  height: 15px;
  background-color: var(--gutter-hover-background-color);
  /* embedding breakpoint.svg */
  mask: url()
    no-repeat;
  mask-size: auto 15px;
  mask-position: right;
}

.editor-wrapper
  :not(.empty-line):not(.new-breakpoint)
  > .CodeMirror-gutter-wrapper
  > .CodeMirror-linenumber:hover::after {
  content: "";
  position: absolute;
  /* paint below the number */
  z-index: -1;
  top: 0;
  left: 0;
  right: -4px;
  bottom: 0;
  height: 15px;
  background-color: var(--gutter-hover-background-color);
  /* embedding breakpoint.svg */
  mask: url()
    no-repeat;
  mask-size: auto 15px;
  mask-position: right;
}

.editor.new-breakpoint svg {
  fill: var(--breakpoint-fill);
  stroke: var(--breakpoint-stroke);
  width: 60px;
  height: 15px;
  position: absolute;
  top: 0px;
  right: -4px;
}

.editor .breakpoint {
  position: absolute;
  right: -2px;
}

.editor.new-breakpoint.folding-enabled svg {
  right: -16px;
}

.editor.new-breakpoint.breakpoint-disabled svg {
  fill-opacity: var(--breakpoint-disabled-opacity);
  stroke-opacity: var(--breakpoint-disabled-opacity);
}

/* Columnn breakpoints */
.column-breakpoint {
  display: inline;
  padding-inline-start: 1px;
  padding-inline-end: 1px;
}

.column-breakpoint:hover {
  background-color: transparent;
}

.column-breakpoint svg {
  display: inline-block;
  cursor: pointer;
  height: 13px;
  width: 11px;
  vertical-align: text-bottom;
  fill: var(--breakpoint-fill);
  stroke: var(--breakpoint-stroke);
  fill-opacity: var(--breakpoint-inactive-opacity);
  stroke-opacity: var(--breakpoint-inactive-opacity);
}

.column-breakpoint.active svg {
  fill: var(--breakpoint-fill);
  stroke: var(--breakpoint-stroke);
  fill-opacity: 1;
  stroke-opacity: 1;
}

.column-breakpoint.disabled svg {
  fill-opacity: var(--breakpoint-disabled-opacity);
  stroke-opacity: var(--breakpoint-disabled-opacity);
}
